import React from "react";
//1.引入css文件
import './index.css'
// 2.引入Item
import Item from './Item'



export default function List({todoList,setTodoList}) {
    return (
        <ul class="todo-main">
            {
                todoList.map(item=>{
                    return <Item key={item.id} {...item} todoList={todoList} setTodoList={setTodoList}/>
                })
            }
        </ul>
    )
}